//
//  PGUserViewCell.m
//  youqu
//
//  Created by 彭鹏 on 16/10/23.
//  Copyright © 2016年 pengpeng. All rights reserved.
//

#import "PGUserViewCell.h"


#import "PGUserModel.h"
#import <SDWebImage/UIImageView+WebCache.h>
@interface PGUserViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *headerImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *fansLabel;

@end

@implementation PGUserViewCell

- (void)awakeFromNib {
    [super awakeFromNib];

}

- (void)setItem:(PGUserModel *)item {
    _item = item;
    
//    PGUserItem *myitem;
//    myitem.header;
//    item.header;
//    item.header;
    [_headerImageView sd_setImageWithURL:[NSURL URLWithString:item.header] placeholderImage:[UIImage imageNamed:@"defaultUserIcon"] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        _headerImageView.image = [image imageCicle:image];
    }];
    
    _nameLabel.text = item.screen_name;
    
    _fansLabel.text = item.fans_count;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
